import { AxiosPromise } from 'axios'
import request from '/@/utils/request'

/***
 * @param 订单有关
 */

const prefix = '/api_dms/order/'
// 客户订单创建
export const customerOrderInsert: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}insert`, { data })

// 客户订单列表
export const customerOrderList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}list`, { data })

// 客户订单详情
export const customerOrderInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}info`, { data })

// 客户订单变更状态
export const customerOrderUpdateStatus: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}updateStatus`, { data })

// 客户订单编辑
export const customerOrderUpdate: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}update`, { data })

// 检测信用额度接口
export const checkCustomerCredit: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}checkCustomerCredit`, { data })

// 获取搜索项数据
export const getSearchBase: () => AxiosPromise = () =>
  request(`${prefix}searchBase`)

